package com.ruoyi.orders.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.orders.mapper.TOrderCancelMapper;
import com.ruoyi.orders.domain.TOrderCancel;
import com.ruoyi.orders.service.ITOrderCancelService;

/**
 * 订单取消Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-19
 */
@Service
public class TOrderCancelServiceImpl implements ITOrderCancelService 
{
    @Autowired
    private TOrderCancelMapper tOrderCancelMapper;

    /**
     * 查询订单取消
     * 
     * @param cancelId 订单取消主键
     * @return 订单取消
     */
    @Override
    public TOrderCancel selectTOrderCancelByCancelId(Long cancelId)
    {
        return tOrderCancelMapper.selectTOrderCancelByCancelId(cancelId);
    }

    /**
     * 查询订单取消列表
     * 
     * @param tOrderCancel 订单取消
     * @return 订单取消
     */
    @Override
    public List<TOrderCancel> selectTOrderCancelList(TOrderCancel tOrderCancel)
    {
        return tOrderCancelMapper.selectTOrderCancelList(tOrderCancel);
    }

    /**
     * 新增订单取消
     * 
     * @param tOrderCancel 订单取消
     * @return 结果
     */
    @Override
    public int insertTOrderCancel(TOrderCancel tOrderCancel)
    {
        return tOrderCancelMapper.insertTOrderCancel(tOrderCancel);
    }

    /**
     * 修改订单取消
     * 
     * @param tOrderCancel 订单取消
     * @return 结果
     */
    @Override
    public int updateTOrderCancel(TOrderCancel tOrderCancel)
    {
        return tOrderCancelMapper.updateTOrderCancel(tOrderCancel);
    }

    /**
     * 批量删除订单取消
     * 
     * @param cancelIds 需要删除的订单取消主键
     * @return 结果
     */
    @Override
    public int deleteTOrderCancelByCancelIds(Long[] cancelIds)
    {
        return tOrderCancelMapper.deleteTOrderCancelByCancelIds(cancelIds);
    }

    /**
     * 删除订单取消信息
     * 
     * @param cancelId 订单取消主键
     * @return 结果
     */
    @Override
    public int deleteTOrderCancelByCancelId(Long cancelId)
    {
        return tOrderCancelMapper.deleteTOrderCancelByCancelId(cancelId);
    }
}
